]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/scroll-view: Don't emit superfluous style-changed events on children
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 14 Nov 2019 07:37:25 +0000 (08:37 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 30 Jul 2021 13:59:18 +0000 (13:59 +0000)
Since we correctly call the `style_changed` vfunc superclass at the end
of our own function anyway, the style changes will get propagated to the
children of the scrollView inside `st_widget_real_style_changed` anyway.

So remove those unneeded and quite expensive (because they cause the
theme node to be regenerated) calls to `st_widget_style_changed`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/953>

src/st/st-scroll-view.c

index 606701565d12b327cb099bb9a55b2f1e5032060b..fe7f3313e35b7b0df1b43017e80f3bda401234ff 100644 (file)
@@ -752,7 +752,6 @@ static void
 st_scroll_view_style_changed (StWidget *widget)
 {
   StScrollView *self = ST_SCROLL_VIEW (widget);
-  StScrollViewPrivate *priv = self->priv;
 
   StThemeNode *theme_node = st_widget_get_theme_node (widget);
   gdouble vfade_offset = st_theme_node_get_length (theme_node, "-st-vfade-offset");
@@ -765,9 +764,6 @@ st_scroll_view_style_changed (StWidget *widget)
                                        .right = hfade_offset,
                                      });
 
-  st_widget_style_changed (ST_WIDGET (priv->hscroll));
-  st_widget_style_changed (ST_WIDGET (priv->vscroll));
-
   ST_WIDGET_CLASS (st_scroll_view_parent_class)->style_changed (widget);
 }